package com.compass.doctor.ui.home.adapter

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.compass.doctor.databinding.LayoutOnReceptionOrderItemBinding
import com.compass.framework.adapter.BaseBindViewHolder
import com.compass.framework.adapter.BaseRecyclerViewAdapter
import com.compass.framework.model.ArticleInfo

/**
 * Description： 患者管理adapter
 * Date:2023/12/23 15:21
 */
class InquiryPatientAdapter : BaseRecyclerViewAdapter<ArticleInfo, LayoutOnReceptionOrderItemBinding>() {



    override fun onBindDefViewHolder(
        holder: BaseBindViewHolder<LayoutOnReceptionOrderItemBinding>,
        item: ArticleInfo?,
        position: Int
    ) {
        if (item == null) return
        holder.binding.apply {
            tvInquiryType.text = "图文问诊"
            var text =
                "由偏头痛引起，常伴随遗传、内分泌、环境精神因素，头痛从轻微隐约到重度。由偏头痛引起，常伴随遗传、内分泌、环境精神因素，头痛从轻微隐约到重度。由偏头痛引起，常伴随遗传、内分泌、环境精神因素，头痛从轻微隐约到重度。"
            tvDiagnoseContent.text = text

            tvTransferTreatment.visibility=View.GONE


        }
    }

    override fun getViewBinding(
        layoutInflater: LayoutInflater,
        parent: ViewGroup,
        viewType: Int
    ): LayoutOnReceptionOrderItemBinding {
        return LayoutOnReceptionOrderItemBinding.inflate(layoutInflater, parent, false)
    }
}